package com.turtle3d.user.grammars;

import com.turtle3d.formallanguage.grammar.Grammar;
import com.turtle3d.formallanguage.grammar.parser.SimpleParser;
import com.turtle3d.formallanguage.symbol.Symbol;
import com.turtle3d.formallanguage.symbol.SymbolFactory;

public class SierpinskiPyramid extends Grammar
{

	@Override
	public void define()
	{	
		
		setAxiom(SymbolFactory.getSymbolFactory().createSymbolofClass("B"));
		setDefaultParameter("turnAngle", 45f);
		setDefaultParameter("pitchAngle", 45f);									
				
		addProduction(SimpleParser.parseProduction("B->\\\\[+F+[--//B]+F+[----//B]+F+[++//B]+F+[//B]++/F\\--//B]"));
		addProduction(SimpleParser.parseProduction("F->FF"));

	}

}
